package com.yunzheng.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author 郭思良
 * @create 2020-07-23 15:38
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "project_file")
@Accessors(chain = true)
public class ProjectFile implements Serializable {
    /**
     * 文档id
     */
    @TableId(value = "file_id", type = IdType.INPUT)
    private String fileId;

    /**
     * 文档标题
     */
    @TableField(value = "file_title")
    private String fileTitle;

    /**
     * 0正常，-1被删除
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 所在项目
     */
    @TableField(value = "file_project")
    private String fileProject;

    /**
     * 上传人
     */
    @TableField(value = "uploader")
    private String uploader;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_FILE_ID = "file_id";

    public static final String COL_FILE_TITLE = "file_title";

    public static final String COL_STATUS = "status";

    public static final String COL_FILE_PROJECT = "file_project";

    public static final String COL_UPLOADER = "uploader";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";


    public ProjectFile(String fileId, String fileTitle, String fileProject, String uploader, LocalDateTime createTime){
        this.fileId = fileId;
        this.fileTitle = fileTitle;
        this.fileProject = fileProject;
        this.uploader = uploader;
        this.createTime = createTime;
    }
}
